Basic Library for WinRT
Getting the Text or Value of the SelectedItem in a TreeView

The Header property will return the values contained in your C1TreeViewItems, you can get the string value using the following code:

Visual Basic
Copy Code
Dim item As C1TreeViewItem = _tree.SelectedItem
_textBlock.Text = item.Header.ToString()

C#
Copy Code
C1TreeViewItem item = _tree.SelectedItem;
_textBlock.Text = item.Header.ToString();

What You've Accomplished

Run your application and observe that the Header property will return the values contained in your C1TreeViewItems.

See Also

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback